<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<title>Maquettes Paris Ouest - Accueil</title>
		<link href="medias/jotform.css" rel="stylesheet" type="text/css" />
		<link href="medias/style.css" rel="stylesheet" type="text/css" />
		<link href="medias/drag_drop.css" rel="stylesheet" type="text/css" />
		<SCRIPT language='javascript' src='medias/mootools_core.js'></SCRIPT>
		<SCRIPT language='javascript' src='medias/mootools_more.js'></SCRIPT>
	</head>
	<body>
<script type="text/javascript">
//<![CDATA[
		window.addEvent('domready', function(){
			$$('.item').addEvent('mousedown', function(event){
				event.stop();

				// `this` refers to the element with the .item class
				 var shirt = this;

				var clone = shirt.clone().setStyles(shirt.getCoordinates()).setStyles({
				  opacity: 0.7,
				  position: 'absolute'
				}).inject(document.body);

				var drag = new Drag.Move(clone, {

					  droppables: $('cart'),

					  onDrop: function(dragging, cart){

						dragging.destroy();

						if (cart != null){
						  shirt.clone().inject(cart);
						  cart.highlight('#FFF', '#FFF');
						}
					  },
					  onEnter: function(dragging, cart){
						cart.tween('background-color', '#222222');
					  },
					  onLeave: function(dragging, cart){
						cart.tween('background-color', '#111111');
					  },
					  onCancel: function(dragging){
						dragging.destroy();
					  }
				  
				});
				drag.start(event);
			  });
		});

		function viderPanier()
		{
			var cart = document.getElementById("cart");
			var labels = cart.getElementsByTagName("label");
			
			for(var i = 0; i < labels.length; i++)
			{
				cart.removeChild(labels[i]);
			}
			
		}
		
	//]]> 
</script>
<div id="houhouhou">
<div id="items">
  <label class="item" for="1">Anglais</label>
  <label class="item" for="1">CAR3</label>
  <label class="item" for="1">SGBD</label>
  <label class="item" for="1">MSI</label>
  <label class="item" for="1">EBusiness</label>
  <label class="item" for="1">SSI</label>
  <div id="cart">
    <div class="info">UE <a href="#" onclick="viderPanier()">viday</a></div>
</div>
</div>
</div>